import service from '@/utils/request'

// @Tags Avatar
// @Summary 创建Avatar
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Avatar true "创建Avatar"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /avatar/createAvatar [post]
export const createAvatar = (data) => {
  return service({
    url: '/avatar/createAvatar',
    method: 'post',
    data
  })
}

// @Tags Avatar
// @Summary 删除Avatar
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Avatar true "删除Avatar"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /avatar/deleteAvatar [delete]
export const deleteAvatar = (data) => {
  return service({
    url: '/avatar/deleteAvatar',
    method: 'delete',
    data
  })
}

// @Tags Avatar
// @Summary 删除Avatar
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除Avatar"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /avatar/deleteAvatar [delete]
export const deleteAvatarByIds = (data) => {
  return service({
    url: '/avatar/deleteAvatarByIds',
    method: 'delete',
    data
  })
}

// @Tags Avatar
// @Summary 更新Avatar
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Avatar true "更新Avatar"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /avatar/updateAvatar [put]
export const updateAvatar = (data) => {
  return service({
    url: '/avatar/updateAvatar',
    method: 'put',
    data
  })
}

// @Tags Avatar
// @Summary 用id查询Avatar
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Avatar true "用id查询Avatar"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /avatar/findAvatar [get]
export const findAvatar = (params) => {
  return service({
    url: '/avatar/findAvatar',
    method: 'get',
    params
  })
}

// @Tags Avatar
// @Summary 分页获取Avatar列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取Avatar列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /avatar/getAvatarList [get]
export const getAvatarList = (params) => {
  return service({
    url: '/avatar/getAvatarList',
    method: 'get',
    params
  })
}
